//
//  TitleNavigationTableView.h
//  mcrmSAAS
//
//  Created by wjxfhxy on 15/7/10.
//  Copyright (c) 2015年 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>

@class TitleNavigationTableView;

@protocol TitleNavigationTableViewDelegate <NSObject>

-(CGFloat)titleNavigationTableView:(TitleNavigationTableView*)view heightForRow:(NSUInteger)row atPageIndex:(NSUInteger)index;

-(NSString*)titleNavigationTableView:(TitleNavigationTableView*)view titleAtPageIndex:(NSUInteger)index;

-(NSUInteger)titleNavigationTableView:(TitleNavigationTableView*)view numberOfRowAtPageIndex:(NSUInteger)index;

-(XUITableViewCell*)titleNavigationTableView:(TitleNavigationTableView*)view reuseCell:(XUITableViewCell*(^)(NSString *reuseIdentifier))reuseCell forRow:(NSUInteger)row atPageIndex:(NSUInteger)index;

@optional

-(void)titleNavigationTableView:(TitleNavigationTableView*)view didSelectedTitleAtPageIndex:(NSUInteger)index;

-(void)titleNavigationTableView:(TitleNavigationTableView*)view didSelectedRow:(NSUInteger)row atPageIndex:(NSUInteger)index;

-(void)refreshCurrentTableViewContent:(TitleNavigationTableView *)view;

-(id)refreshCurrentTableViewContentLastUpdateTime:(TitleNavigationTableView *)tableview;

-(void)titleNavigationTableViewWillBeginDragging:(TitleNavigationTableView *)view;

-(void)titleNavigationTableView:(TitleNavigationTableView*)view willReappearPageIndex:(NSUInteger)index;

@end

@interface TitleNavigationTableView : UIView

@property(nonatomic,weak) id<TitleNavigationTableViewDelegate> delegate;

-(void)addTableContent:(BOOL)animated;

-(void)reloadCurrentTableContent;

-(void)beginUpdates;

-(void)endUpdates;

-(void)reloadCurrentTableContentAtRow:(NSUInteger)row animated:(BOOL)animate;

-(void)insertCurrentTabelContentAtRow:(NSUInteger)row animated:(BOOL)animate;

-(void)deleteCurrentTabelContentAtRow:(NSUInteger)row animated:(BOOL)animate;

-(void)removeContentFromIndex:(NSUInteger)index animated:(BOOL)animated;

-(void)reloadTableContentAtPageIndex:(NSUInteger)index;

-(UITableViewCell*)currentTabelCellAtIndex:(NSUInteger)row;

//-(UITableViewCell*)currentTabelCellWithTag:(NSString*)tag;

-(void)scrollToRowAtIndex:(NSUInteger)index atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animate;

@end
